package com.example.zhunongzonghe.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 
 * @TableName zn_message
 */
@TableName(value ="zn_message")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ZnMessage implements Serializable {
    /**
     * 主键，助农资讯表
     */
    @TableId(value = "zn_mess_id", type = IdType.AUTO)
    private Integer znMessId;

    /**
     * 资讯标题
     */
    @TableField(value = "mess_title")
    private String messTitle;

    /**
     * 资讯内容
     */
    @TableField(value = "mess_content")
    private String messContent;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime updateTime;

    /**
     * 创建人
     */
    @TableField(value = "create_by")
    private Integer createBy;

    /**
     * 更新人
     */
    @TableField(value = "update_by")
    private Integer updateBy;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}